<template>
  <div class="test">

<div class="main_top">
            基本信息
        </div>
        <el-table :data="tableData"  border style="width: 400px; margin-top: 20px"
            :show-header="this.header"
            :cell-style="setCellColor"
            :header-cell-style="{'background':'#eef1f6','font-weight':'500'}" >
            <el-table-column prop="name" label="优惠券品类" width="100px"></el-table-column>
            <el-table-column width="100px">
                <template slot="header" slot-scope="scope">
                    <span>TEST</span>
                </template>
                <template slot-scope="scope">
                    <span>{{scope.row.value}}</span>
                </template>
            </el-table-column>
            <el-table-column prop="names" label="优惠券名称" width="100px"></el-table-column>
            <el-table-column width="100px">
                <template slot="header" slot-scope="scope">
                    <span >TEST</span>
                </template>
                <template slot-scope="scope">
                    <span>{{scope.row.values}}</span>
                </template>
            </el-table-column>
        </el-table>

  </div>
</template>

<script>
  /* eslint-disable */
  export default {
      data () {
        return {
          header: false,
          tableDatas: [],
          tableData: [],
          pageIndex: 1
        }
      },
      mounted() {
        this.tableDatas = [];
        this.tableData = [];
         this.tableData.push({
                name: "优惠券类型",
                value:'TEST',  //注意值为value
                names: "优惠券说明",
                values:'TEST',  //注意值为values
            }, {
                name: "优惠内容",
                value:'TEST',
                names: "授权用户",
                values:'TEST',
            },
             {
                name: "可用时间",
                value:'TEST',
            }
            );

      },
      computed: {
        id: {
          get () { return this.$store.state.user.id },
          set (val) { this.$store.commit('user/updateId', val) }
        },
        account: {
          get () { return this.$store.state.user.account },
          set (val) { this.$store.commit('user/updateAccount', val) }
        },
        avatar: {
          get () { return this.$store.state.user.avatar },
          set (val) { this.$store.commit('user/updateAvatar', val) }
        }
      },
      activated () {
        // this.getDataList()
      },
      methods: {
        viewHandle (id){
        },
        setCellColor({row,column,rowIndex,columnIndex}){
          if(columnIndex % 2 === 0){
            return 'background-color: #f9f9f9;';
          }
           },
      }
    }
</script>

<style>
</style>
